using Circus.CodeEditor;
using System;
using System.Drawing;
namespace Circus.CodeEditor.TextSource
{
	public class CodeSnippetRange : Range
	{
		private string id;
		private string tooltip;
		private bool isEditable;
		public string ID
		{
			get
			{
				return this.id;
			}
			set
			{
				if (this.id != value)
				{
					this.id = value;
					this.OnIDChanged();
				}
			}
		}
		public string Tooltip
		{
			get
			{
				return this.tooltip;
			}
			set
			{
				if (this.tooltip != value)
				{
					this.tooltip = value;
					this.OnTooltipChanged();
				}
			}
		}
		public bool IsEditable
		{
			get
			{
				return this.isEditable;
			}
			set
			{
				if (this.isEditable != value)
				{
					this.isEditable = value;
					this.OnIsEditableChanged();
				}
			}
		}
		protected virtual void OnIDChanged()
		{
		}
		protected virtual void OnTooltipChanged()
		{
		}
		protected virtual void OnIsEditableChanged()
		{
		}
		public CodeSnippetRange(Point start, Point end) : base(start, end)
		{
		}
		public CodeSnippetRange(Point start, Point end, string id, string tooltip, bool isEditable) : base(start, end)
		{
			this.id = id;
			this.tooltip = tooltip;
			this.isEditable = isEditable;
		}
		public override object Clone()
		{
			return new CodeSnippetRange(this.StartPoint, this.EndPoint, this.id, this.tooltip, this.isEditable);
		}
	}
}
